import request from '@/utils/request'

// 查询FPX仓储信息列表
export function listWarehousInfo(query) {
  return request({
    url: '/purchase/warehouseProductSku/list',
    method: 'get',
    params: query
  })
}

// 查询FPX仓储信息详细
export function getWarehousInfo(id) {
  return request({
    url: '/system/warehousInfo/' + id,
    method: 'get'
  })
}

// 申请FPX仓储
export function addWarehousInfo(data) {
  return request({
    url: '/ae/purchaseOrder/warehouseProReplenish',
    method: 'post',
    data: data
  })
}

// 修改FPX仓储信息
export function updateWarehousInfo(data) {
  return request({
    url: '/system/warehousInfo',
    method: 'put',
    data: data
  })
}

// 删除FPX仓储信息
export function delWarehousInfo(id) {
  return request({
    url: '/system/warehousInfo/' + id,
    method: 'delete'
  })
}

export function getProductCode() {
  return request({
    url: "/purchase/fpx/getProductByUserId",
    method: "get"
  })
}

// 获取仓储商品列表
export function getUserProduct(data) {
  return request({
    // url: "/purchase/fpx/getUserProduct",
    url: "/purchase/fpx/getWarehousInfo",
    method: "get",
    params: data
  })
}

// 获取仓库列表
export function warehouseList(query) {
  return request({
    url: "/purchase/warehouseList/getWarehouseList",
    method: "get",
    params: query
  })
}

// 声明发货
export function sellerShipmentForEvaluation(query) {
  return request({
    url: "/gather/sellerStoreProductEvaluation/sellerShipmentForEvaluation",
    method: "get",
    params: query
  })
}

// 查看仓储记录
export function getWarehousRecords(query) {
  return request({
    url: "/purchase/fpx/getWarehousRecords",
    method: "get",
    params: query
  })
}

// 申请仓储
export function sendOutGoodsToFPX(query) {
  return request({
    url: "/purchase/fpx/sendOutGoodsToFPX",
    method: "post",
    data: query
  })
}


// 查询熊迪库存
export function queryInventory(data) {
  return request({
    url: "/kjx/storeProductRecord/storeProductList",
    method: 'get',
    params: data
  })
}

// 查询熊迪账号列表
export function queryXdAccount(data) {
  return request({
    url: "/kjx/storeAccount/list",
    method: 'get',
    params: data
  })
}

// 查询仓库列表
export function queryStoreAddress(data) {
  return request({
    url: "/kjx/storeProductRecord/getStoreAddress",
    method: 'get',
    params: data
  })
}
